package me.imvc.app.entities;

// Generated 2011-12-22 13:09:31 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;

import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Entity;
import org.hibernate.search.annotations.Analyzer;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.wltea.analyzer.lucene.IKAnalyzer;

/**
 * Roles generated by hbm2java
 */
@Entity
@Indexed
@Analyzer (impl = IKAnalyzer.class )
public class Roles implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1149622106207641178L;
	@DocumentId
	private Long id;
	@Field
	@NotNull
	private String code;
	@Field
	private String name;
	@Field
	private String remark;
	private Set<Authorities> authoritieses = new HashSet<Authorities>(0);

	public Roles() {
	}

	public Roles(String code) {
		this.code = code;
	}

	public Roles(String code, String name, String remark,
			Set<Authorities> authoritieses) {
		this.code = code;
		this.name = name;
		this.remark = remark;
		this.authoritieses = authoritieses;
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Set<Authorities> getAuthoritieses() {
		return this.authoritieses;
	}

	public void setAuthoritieses(Set<Authorities> authoritieses) {
		this.authoritieses = authoritieses;
	}

}
